﻿namespace IceCS.Permission.Core.Enums
{
    /// <summary>
    /// 用户行为
    /// </summary>
    /// <remarks>一个博客网站上用户可以进行操作的行为枚举</remarks>
    //[Flags]// add flags 特性
    public enum UserAction : long
    {
        /*
         * 0,   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
         * 1,   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000001
         * 2,   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000010
         * 4,   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000100
         * 8,   00000000 00000000 00000000 00000000 00000000 00000000 00000000 00001000
         * 16,  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00010000
         * 32,  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00100000
         * 64,  00000000 00000000 00000000 00000000 00000000 00000000 00000000 01000000
         * 128, 00000000 00000000 00000000 00000000 00000000 00000000 00000000 10000000
         * 256, 00000000 00000000 00000000 00000000 00000000 00000000 00000001 00000000
         * 512, 00000000 00000000 00000000 00000000 00000000 00000000 00000010 00000000
         * 1024,00000000 00000000 00000000 00000000 00000000 00000000 00000100 00000000
         */
        /// <summary>
        /// 无任何操作
        /// </summary>
        None = 0,//0
        /// <summary>
        /// 预览
        /// </summary>
        PreviewArticle = 1 << 0,//1
        /// <summary>
        /// 创建
        /// </summary>
        CreateArticle = 1 << 1,//2
        /// <summary>
        /// 编辑
        /// </summary>
        EditArticle = 1 << 2,//4
        /// <summary>
        /// 删除
        /// </summary>
        DeleteArticle = 1 << 3,//8
        /// <summary>
        /// 评论
        /// </summary>
        CommentArticle = 16,
        /// <summary>
        /// 点赞
        /// </summary>
        LikeArticle = 32,
        /// <summary>
        /// 收藏
        /// </summary>
        CollectionArticle = 64,
        /// <summary>
        /// 置顶
        /// </summary>
        MakeTop = 128,
        Action1 = 256,
        Action2 = 512,
        Action3 = 1024,
        Action4 = 2048,
    }
}
